<template>
  <div class="not-found">
    <el-result icon="warning" title="404" sub-title="Not Found">
      <template #extra>
        <el-button class="back-btn" type="primary" @click="toBack">返回首页</el-button>
      </template>
    </el-result>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from "vue-router"

const router = useRouter()
const toBack = () => {
  router.push("/")
}
</script>

<style lang="scss" scoped>
.not-found {
  position: relative;
  top: -20%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;

  .back-btn {
    background-color: var(--color-primary);
  }
}
</style>
